home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
dev
/
asm
/
Tandem2.68.lha
/
Tandem
/
Teaching
/
10.asm
< prev
next >
Wrap
Assembly Source File
|
2000-04-02
|
640b
|
16 lines
* 10.asm Subroutine to convert a-z to A-Z version 0.00 1.9.97
move.b #'c',d0 ;try various things here
bsr Upper
rts
* if d0=a-z, convert to A-Z (and ignore non-alphabetic characters)
Upper:
cmp.b #'a',d0 ;BRA extension .B means "byte" - max jump 126 bytes
bcs.s Up_done ;BRA extension .W means "word" - max jump 32766 bytes
cmp.b #'z'+1,d0 ;use .S where possible, since it's quicker & shorter
bcc.s Up_done ;default for forward jumps is .L, so put .S if short
add.b #'A'-'a',d0 ; Tandem selects .B or .W automatically for backward
Up_done: ; jumps, so omit .B or .W for backward jumps
rts